// @ts-ignore
import cors from "koa2-cors"
// @ts-ignore
import Koa from "koa2"
// @ts-ignore
import { koaBody } from "koa-body"
import useRouters from "@/router/routes";

const app = new Koa()
app.use(cors())
useRouters(app)

// 中间件
app.use(
  koaBody({
    multipart: true
  })
)
const port = 3001
app.listen(port, function () {
  console.log("http://localhost:" + port)
})
